package JAVA300.第十章IO;
/**
 * 自己写一遍IO操作
 */

import java.io.*;

public class IO_Study02_1 {
    public static void main(String[] args) {

        File file = new File("D:\\Java300_Exp\\src\\JAVA300\\第十章IO\\IOTest01.txt");
        InputStream is = null;
        try {
             is = new FileInputStream(file);

            int temp;
            while ((temp=is.read())!= -1){
                System.out.println((char)temp);
               // System.out.println((char) is.read());
            }

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                if (null != is){
                    is.close();

                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
